package com.sitanyun.merchant.guide.view.fragment;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.sitanyun.merchant.guide.R;

import androidx.fragment.app.DialogFragment;

/**
 * Created by jzl
 * on 2022/1/21.
 */
public class SeeImagesFramgment extends DialogFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        DisplayMetrics dm = new DisplayMetrics();
        getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
        getDialog().getWindow().setLayout(dm.widthPixels, getDialog().getWindow().getAttributes().height);
        getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        getDialog().getWindow().setGravity(Gravity.TOP); //顶部位置
        View v = inflater.inflate(R.layout.activity_dialog, container, false);
//       ImageView cimg = v.findViewById(R.id.cimg);
        TextView tvzd = v.findViewById(R.id.tv_zd);
        tvzd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });


        return v;
    }

//    public void setUpload(MessagesBean messagesBean) {
//        mEssagesBean = messagesBean;
//    }
}